package com.kycxika.app.dbutils.inter;


import com.kycxika.app.bean.AuthorizedBean;
import com.kycxika.app.bean.IsBlackBean;
import com.kycxika.app.bean.LoginBean;
import com.kycxika.app.bean.RegisterBean;
import com.kycxika.app.bean.pic.UploadPicEntiry;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.*;
import rx.Observable;


/**
 * Created by Administrator on 2017/11/1.
 */

public interface HttpApi {


    @GET("/communityaddr/blocks")
    Observable<String> getCommunityBlock(@Query("communityid") String communityid, @Query("term") String term);  //例子

    @POST("/room/auths")
    Observable<String> doAuthRoom(@Body String authRoomBody, @Query("access-token") String access_token);


    @Multipart
    @POST("/upload")
    Observable<ResponseBody> uploadPictrue(@Part("picture") MultipartBody.Part file);

    //图片上传
    @Multipart
    @POST("/api/user/uppics")
    Observable<UploadPicEntiry> testUploadPictrue(@Query("str")String str, @Query("token")String token,@Query("user_id")int userid, /*@PartMap Map<String, RequestBody> params*/@Part MultipartBody.Part file);


    @FormUrlEncoded
    @POST("/api/index/index")
    Observable<AuthorizedBean> getAuthorized(@Field("appkey") String appkey,@Field("str") String ranstr,@Field("sign") String sign);


    //登录
    @FormUrlEncoded
    @POST("/api/user/login")
    Observable<LoginBean> getLogin(@Field("token") String token,@Field("str")String str, @Field("username") String username, @Field("password") String password);

    //注册
    @FormUrlEncoded
    @POST("/api/user/register")
    Observable<RegisterBean> getUserRegister(@Field("token") String token, @Field("str")String str, @Field("user_name") String username, @Field("user_pwd") String password);



    //获取vip列表
    @GET("/visitorinone/viplists")
    Observable<IsBlackBean> getVIPVistorList(@Query("access-token") String access_token, @Query("page")int page);

}
